//声明一个常量存储token的key值
const HMKEY='hm-toutian'

//存token
function saveToken(obj) {
    localStorage.setItem(HMKEY,JSON.stringify(obj))
}

//取token
function getToken() {
    return JSON.parse(localStorage.getItem(HMKEY))
}

//删除token
function removeToken() {
localStorage.removeItem(HMKEY)
}

export{saveToken,getToken,removeToken}